/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package restaurante;

import javafx.scene.layout.Region;
import javafx.scene.shape.*;

/**
 *
 * @author 66785403
 */
public class AreaEle extends Area {

    public double width, height;
    private Path path;
    private MoveTo moveTo;
    private VLineTo leftVLine, rightVLine, rightBotVLine;
    private HLineTo topHLine, botHLine, botRightHLine;

    public AreaEle(double width_, double height_) {
        super();
        this.width = width_;
        this.height = height_;
        createEle();
        super.shape = (Shape) path;
        super.configureShape();
        super.getChildren().add(super.shape);
    }

    private void createEle() {
        moveTo = new MoveTo(0, 0);
        leftVLine = new VLineTo(height);
        botHLine = new HLineTo(width);
        rightBotVLine = new VLineTo(height / 2);
        botRightHLine = new HLineTo(width / 2);
        rightVLine = new VLineTo(0);
        topHLine = new HLineTo(0);
        path = new Path();
        path.getElements().addAll(moveTo, leftVLine, botHLine, rightBotVLine,
                botRightHLine, rightVLine, topHLine);
    }
}
